Robot control apparatus, robot control method, and program

ABSTRACT

A robot control apparatus includes a section setter to set, on a straight line connecting a start point to an end point, an acceleration section until reaching a predetermined angular velocity, a constant velocity section in which the predetermined angular velocity is maintained, and a deceleration section in which the predetermined angular velocity is decreased, a segment setter to divide each of the acceleration section, the constant velocity section, and the deceleration section into a plurality of segments and to set segment distances of each of the acceleration section, the constant velocity section, and the deceleration section so as to equalize or substantially equalize moving times of the segments of the reference point to each other, and when the reference point is moved in each of the segments according to point to point control, an angular velocity setter to set an angular velocity of each of the segments based on a variance in an angle of a joint which becomes maximum with respect to each of the segments in each of the acceleration section, the constant velocity section, and the deceleration section.

CROSS REFERENCE TO RELATED APPLICATION

This application claims the benefit of priority to Japanese PatentApplication No. 2018-058527 filed on Mar. 26, 2018. The entire contentsof this application are hereby incorporated herein by reference.

FIELD OF THE DISCLOSURE

The present disclosure relates to a robot control apparatus, a robotcontrol method, and a program.

BACKGROUND

Conventionally, point to point (PTP) control is known as a path controlmethod of moving a position of a distal end of an arm (an end of a hand)of a robot from a start point (teaching point) to an end point (teachingpoint). Further, linear interpolation control of moving the position ofthe distal end of the arm of the robot along a linear path is known.

The conventional robot control apparatus includes a robot speedcalculation device having a part for acquiring current positioninformation on a robot, a part for acquiring maximal rated speedinformation on a joint of the robot, and a part for calculating apermissible speed limit that can be taken in a linear interpolationoperation on the distal end of the robot on the basis of the currentposition information on the robot and the maximal rated speedinformation on the joint.

Further, whether an interpolation type of two before and after movementsections is switched from a joint interpolation operation to a linearinterpolation operation or from the linear interpolation operation tothe joint interpolation operation is determined, and when the distal endof the arm passes a connection point between the two before and aftermovement sections or passes through the vicinity of the connectionpoint, whether a speed combination process is possible is determined. Insome cases, when it is determined that the speed combination process ispossible, an interpolation point for performing a combination of speedsbetween different types of interpolation operations may be determined bya joint parameter.

When a distal end of an arm of a robot is moved from a start point to anend point, PTP control is applied to minimize a moving time. However,since a movement path is not ensured in the PTP control, the distal endof the arm has the possibility of a collision with other objects orwalls in a working space of the robot.

In linear interpolation control, the distal end of the arm of the robotcan be moved on a linear path, and the movement path from the startpoint to the end point can be ensured. However, conventionally, thedistal end of the arm of the robot cannot be moved at a high speed.

SUMMARY

According to an example embodiment of the present disclosure, a robotcontrol apparatus for moving a reference point of an articulated robotincluding a plurality of joints from a start point to an end point by alinear interpolation includes a section setter to set, on a straightline connecting the start point to the end point, an accelerationsection in which the reference point is accelerated from the start pointto reach a predetermined angular velocity, a constant velocity sectionin which the reference point is maintained at the predetermined angularvelocity, and a deceleration section in which the reference point isdecelerated from the predetermined angular velocity to reach the endpoint. The robot control apparatus includes a segment setter to divideeach of the acceleration section, the constant velocity section, and thedeceleration section into a plurality of segments and to set segmentdistances of each of the acceleration section, the constant velocitysection, and the deceleration section so as to equalize or substantiallyequalize moving times of the segments of the reference point to eachother. The robot control apparatus includes, when the reference point ismoved in each of the segments according to point to point (PTP) control,an angular velocity setter to set an angular velocity of each of thesegments based on a variance in an angle of a joint of which angularvariance becomes maximum with respect to each of the segments in each ofthe acceleration section, the constant velocity section, and thedeceleration section.

The above and other elements, features, steps, characteristics andadvantages of the present disclosure will become more apparent from thefollowing detailed description of example embodiments with reference tothe attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram illustrating a configuration of a robotsystem according to a first example embodiment of the presentdisclosure.

FIG. 2 is a diagram illustrating an internal configuration of the robotsystem according to the first example embodiment of the presentdisclosure.

FIG. 3 is a functional block diagram of a robot control apparatusaccording to the first example embodiment of the present disclosure.

FIG. 4 is a graph showing a variation in angular velocity of a mainjoint with the passage of time when the main joint is moved according topoint to point (PTP) control.

FIG. 5 is a diagram for describing an acceleration section and adeceleration section.

FIG. 6 is a diagram showing a variation in angular velocity by the PTPcontrol with the passage of time.

FIG. 7 is a diagram for describing a calculation method of theacceleration section.

FIG. 8 is a graph showing a variation in angular velocity with thepassage of time according to a robot control method of the first exampleembodiment of the present disclosure.

FIG. 9 is a flowchart executed by the robot control apparatus of thefirst example embodiment of the present disclosure.

FIG. 10 is a graph for describing a variation in the number of controlpulses with the passage of time in the PTP control and the controlaccording to the first example embodiment of the present disclosure.

FIG. 11 is a graph showing a variation in angular velocity with thepassage of time before and after a segment adjustment in a robot controlmethod according to a second example embodiment of the presentdisclosure.

FIG. 12 is a flowchart executed by the robot control apparatus of thefirst example embodiment of the present disclosure.

DETAILED DESCRIPTION

Hereinafter, robot systems each including a robot control apparatusaccording to example embodiments of the present disclosure will bedescribed.

In the robot system according to each of the example embodiments, adistal end of an arm of a robot, i.e., a position which is an attachmentreference of an end effector as a reference point of the robot, iscontrolled to be moved by linear interpolation control from a startpoint to an end point. In the linear interpolation control, a straightline connecting the start point to the end point is divided into aplurality of segments, and the robot is operated by point to point (PTP)control in each of the plurality of segments. In this case, a PTPoperation in each of the segments optimally determines an angularvelocity in each of the segments as a constant angular velocity, therebyimplementing a high-speed pseudo-linear motion.

In the following description, the reference point of the robot means aposition of the robot which is a reference point of a teaching point ofthe robot such as an approaching point, a target point, or a departurepoint of the robot. For example, the reference point is a tool centerpoint (TCP).

In the following description, movement of the robot between two pointsmeans that the reference point of the robot is moved between the twopoints.

A configuration of a robot system 1 of a first example embodiment willbe described first with reference to FIGS. 1 and 2. FIG. 1 is aschematic diagram illustrating a configuration of a robot system 1according to the present example embodiment. FIG. 2 is a diagramillustrating an internal configuration of the robot system 1 accordingto the present example embodiment.

As shown in FIG. 1, the robot system 1 includes an information processor2, a robot control apparatus 3, and a robot R. For example, theinformation processor 2 is connected to communicate with the robotcontrol apparatus 3 through, for example, an Ethernet (registeredtrademark) cable EC.

For example, the information processor 2 is a device for teaching therobot R installed at a factory line how to operate. The informationprocessor 2 is installed to allow an operator to perform teaching. Theinformation processor 2 may be disposed at a position away from afactory or the like in which the robot R is installed (e.g., a workplace of the operator separated from the factory).

For example, the information processor 2 is a personal computer deviceor a tablet computer device. The information processor 2 is installed toallow the operator to perform off-line teaching or on-line teaching. Apredetermined teaching program is executed such that a teaching point oran operating parameter of the robot R is determined.

The robot control apparatus 3 controls the robot R by executing a robotprogram on the basis of the teaching point or the operating parameter ofthe robot R transmitted from the information processor 2. As the resultof the execution of the robot program, the robot control apparatus 3transmits control pulses for a plurality of motors, which operate jointsof the robot R, to the robot R.

The robot R is an articulated robot including a plurality of joints. Therobot R drives the motors of the joints in response to the controlpulses received from the robot control apparatus 3 to perform anoperation according to the teaching point or the operating parameterdetermined by the information processor 2.

Referring to FIG. 2, the information processor 2 includes a controller21, a storage 22, an input device 23, a display device 24, and acommunication interface 25.

The controller 21 includes a central processing unit (CPU), a read onlymemory (ROM), and a random access memory (RAM). Teaching software isstored in the ROM. The CPU executes the teaching software stored in theROM by deploying the teaching software in the RAM. The teaching point orthe operating parameter of the robot R set by the operator through theteaching software is installed in the robot program.

The storage 22 is a mass storage device such as a hard disk drive (HDD)or a solid state drive (SSD) and is configured to be sequentiallyaccessible by the CPU of the controller 21. The robot program is storedin the storage 22.

The input device 23 is a device for receiving a manipulation input bythe operator and includes a pointing device.

The display device 24 is a device for displaying an execution result ofthe teaching software and includes a display drive circuit and a displaypanel.

The communication interface 25 includes a communication circuit forperforming Ethernet communication between the information processor 2and the robot control apparatus 3. The controller 21 transmits the robotprogram including the teaching point or the operating parameter of therobot R to the robot control apparatus 3 via the communication interface25 according to a request for executing a simulation of the robot R orfor operating a practice of the robot R by the operator.

As shown in FIG. 2, the robot control apparatus 3 includes a controller31, a storage 32, and a communication interface 33.

The controller 31 includes a CPU, a ROM, and a RAM. The CPU executes therobot program that is received from the information processor 2 andstored in the storage 32 by deploying the robot program in the RAM. TheCPU of the controller 31 executes the robot program such that functions,which will be described below, are realized.

The controller 31 generates control pulses for operating the motors ofthe joints of the robot R at every predetermined time (e.g., every 1 ms)to supply the control pulses to the robot R.

The storage 32 is a mass storage device such as an HDD or an SSD and isconfigured to be sequentially accessible by the CPU of the controller31. In the storage 32, the robot program, which is received from theinformation processor 2, and execution log data, which is an executionrecord of the robot program, are stored.

The communication interface 33 includes a communication circuit forperforming Ethernet communication between the information processor 2and the robot control apparatus 3.

As shown in FIG. 2, the robot R includes a motor drive circuit 101 and amotor 102. The motor drive circuit 101 generates a drive voltagenecessary to drive the motor 102 in response to the control pulsesupplied from the robot control apparatus 3. The number of motors 102 tobe installed matches the number of joints for operating the robot R.

A case in which the robot R is a six-axis vertical articulated robotwill be described below. In this case, the motors 102 for driving sixjoints are installed at the robot R, and a drive voltage is supplied toeach of the motors 102 from the motor drive circuit 101.

Next, a function realized through the execution of the robot program bythe controller 31 of the robot control apparatus 3 will be describedwith reference to FIGS. 3 to 8. FIG. 3 is a functional block diagram ofthe robot control apparatus 3 of the present example embodiment.

As shown in FIG. 3, functions are realized by the robot controlapparatus 3 including a section setting unit 311, a segment setting unit312, an angular velocity setting unit 313, a pulse number setting unit314, and a pulse generator 315. The functions of the above-describedparts will be sequentially described below.

A case in which the reference point of the robot R is pseudo-linearlymoved from a start point A to an end point B will be described below. Inthe following description, the start point A and the end point B areappropriately referred to as point A and point B, respectively.

As described above, the teaching point or the operating parameter of therobot R is set in the robot program of the robot control apparatus 3received from the information processor 2. In the robot program of thepresent example embodiment, the start point A and the end point B areset as teaching points, and an acceleration time, a maximal angularvelocity, and a deceleration time are set as operating parameters formovement from the start point A to the end point B.

In the following description, the acceleration time, the maximal angularvelocity, and the deceleration time, which are set as the operatingparameters, are referred to as “an acceleration time demand value,” “amaximal angular velocity demand value,” and “a deceleration time demandvalue,” respectively. The acceleration time demand value is a demandvalue of an acceleration time until the reference point of the robot Ris accelerated from the start point A to reach a maximal angularvelocity (the maximal angular velocity demand value which is an exampleof a predetermined angular velocity). The deceleration time demand valueis a demand value of a deceleration time until the reference point ofthe robot R is decelerated from a maximal angular velocity to reach theend point B.

In the following description, a joint of which angle variance around acentral axis of each of the six joints of the robot R becomes maximum isreferred to as a “main joint.” A joint becoming a main joint among thesix joints may differ according to a time of interest or a range ofinterest in a linear movement from point A to point B.

The section setting unit 311 includes a function of setting anacceleration section in which the reference point of the robot R isaccelerated from the start point A to reach a maximal angular velocityon a straight line connecting the start point A to the end point B, aconstant velocity section in which the reference point of the robot R ismaintained at the maximal angular velocity, and a deceleration sectionin which the reference point of the robot R is decelerated from themaximal angular velocity to reach the end point B.

In an example of the present example embodiment, the section settingunit 311 sets the acceleration section, the constant velocity section,and the deceleration section on the basis of the above-describedacceleration time demand value and the above-described deceleration timedemand value. A setting method of each of the above-described sectionswill be described below with reference to FIG. 4.

The purpose of the present example embodiment is to allow the robot R tomove at high speed along a straight line AB, and when the robot R movesalong the straight line AB according to the PTP control, a variation invelocity of the main joint is simulated with the passage of time.

FIG. 4 is a graph showing a variation in angular velocity of a mainjoint with the passage of time when the main joint is moved along thestraight line AB according to the PTP control. In FIG. 4, a time atwhich the robot R starts to move at point A and then reaches a maximalangular velocity demand value Vm corresponds to an acceleration timedemand value t1, and a time tf-t2 in which the robot R starts todecelerate from a time t2 and reaches point B at a time tf correspondsto a deceleration time demand value.

In FIG. 4, tf denotes a total moving time when the robot R movesaccording to the PTP control.

FIG. 5 shows a path T_(ptp) generated when the robot R moves along thestraight line AB according to the PTP control, and a path T_(sln)generated when the robot R moves along the straight line AB according tolinear interpolation control of the present example embodiment.

As shown in FIG. 5, the path T_(ptp) generated when the robot R movesalong the straight line AB according to the PTP control is not astraight line path but a curved path. In the path T_(ptp), a sectionbetween point A and a point p1 is an acceleration section of the PTPcontrol, a section between the point p1 and a point p2 is a constantvelocity section of the PTP control, and a section between the point p2and point B is a deceleration section in the PTP control.

The points p1 and p2 correspond to the times t1 and t2 of FIG. 4,respectively. That is, in the PTP control, a time from point A to thepoint p1 corresponds to the acceleration time demand value t1, and atime from the point p2 to point B corresponds to the deceleration timedemand value tf-t2.

Even in the linear interpolation control, it is necessary to set anacceleration section and a deceleration section on the straight line ABto satisfy an acceleration time demand value and a deceleration timedemand value. Thus, when the robot R moves from point A to point Baccording to the PTP control, an acceleration section and a decelerationsection on a straight line in the linear interpolation control are setby projecting the point p1 which is an acceleration end position and thepoint p2 which is a deceleration start position onto the straight lineAB. In FIG. 4, points p1 s and p2 s are points obtained by projectingthe points p1 and p2 on the path T_(ptp) onto the straight line AB inthe PTP control.

In the path T_(sln) according to the linear interpolation control of thepresent example embodiment, a section from point A to the point p1 s isset as the acceleration section and a section from the point p2 s topoint B is set as the deceleration section.

Here, a ratio of a distance acc_dst of the acceleration section to adistance between point A and point B is set to be equal to a ratio of adistance of the acceleration section on the path T_(ptp) according tothe PTP control (a distance between point A and the point p1) to adistance of the T_(ptp). Similarly, a ratio of a distance dacc_dst ofthe deceleration section to the distance of the straight line AB is setto be equal to a ratio of a distance of the deceleration section on thepath T_(ptp) according to the PTP control (a distance between the pointp2 and point B) to the distance of the T_(ptp).

For example, when the ratio of the distance acc_dst of the accelerationsection to the distance of the straight line AB in the path T_(sin) isan acceleration section ratio acc_ratio, the acceleration section ratioacc_ratio is calculated by Equation 1.

Further, in Equation 1, t1 denotes an acceleration time demand value(msec), Vm denotes a maximal angular velocity demand value (radian), andmaxdst denotes angle variance of a main joint. The angle variance of themain joint corresponds to an area of the trapezoid shown in FIG. 4.

$\begin{matrix}{{acc\_ ratio} = \frac{t\; 1 \times {Vm}}{2 \times {maxdst}}} & (1)\end{matrix}$

Since an angle of each of the joints is linearly varied on the straightline AB, an angle p1[i] of each of the joints of the robot R (here, i isone of joint numbers 1 to 6) at the point p1 is calculated by Equation 2using the acceleration section ratio acc_ratio.

Further, in Equation 2, A[i] denotes an angle (radian) of an i^(th)joint at point A, and B[i] denotes an angle (radian) of the i^(th) jointat point B.p1[i]=acc_ratio×(B[i]A[i])+A[i]  (2)

Since the angle of each of the joints at the point p1 may be obtainedthrough Equation 2, orthogonal coordinates of the point p1 may becalculated through forward kinematics. Further, the distance acc_dst ofthe acceleration section on the straight line AB (see FIG. 5) iscalculated from values of the orthogonal coordinates of point A, pointp1, and point B as follows.

As shown in FIG. 6, when a distance between the point p1 and the pointp1 s is h1, h1 is calculated by dividing a magnitude of a vector productof a vector from point A to the point p1 (p 1 in bold of Equation 3) anda vector from point A to point B (AB in bold of Equation 3) by adistance L of the straight line AB according to Equation 3.

Further, when a magnitude of the vector from point A to the point p1 isn1, the distance acc_dst of the acceleration section is calculatedaccording to Equation 4.

$\begin{matrix}{{h\; 1} = \frac{\left( {p\; 1 \times {AB}} \right)}{L}} & (3) \\{{acc\_ dst} = \sqrt{{n\; 1^{2}} - {h\; 1^{2}}}} & (4)\end{matrix}$

Although the method of calculating the distance acc_dst of theacceleration section has been described, the distance dacc_dst of thedeceleration section (see FIG. 5) may be similarly calculated on thebasis of the point p2.

Further, the distance of the constant velocity section by the linearinterpolation operation is obtained by subtracting the distance acc_dstof the acceleration section and the distance dacc_dst of thedeceleration section from the distance L of the straight line AB. Thatis, a distance cst_dst of the constant velocity section is calculatedfrom Equation 5.cst_dst=L−acc_dst−dacc_dst  (5)

In FIG. 3, the segment setting unit 312 includes a function of dividingeach of the acceleration section, the constant velocity section, and thedeceleration section, which are set by the section setting unit 311,into a plurality of segments. In this case, the segment setting unit 312sets segment distances of each of the acceleration section, the constantvelocity section, and the deceleration section so as to substantiallyequalize moving times of the segments of the reference point of therobot R to each other.

A setting method of the segment distances of each of the accelerationsection, the constant velocity section, and the deceleration section inthe linear interpolation control according to the present exampleembodiment will be described below with reference to FIG. 7.

In the setting method, each of the segment distances may be determinedin consideration of an error between a trajectory of the reference pointof the robot R and an ideal straight line thereof, and in considerationof an operation time of the robot R. That is, when the segment distancebecomes larger, since the PTP control is performed in each of thesegments, the trajectory of the reference point of the robot R in eachsegment is discrepant from the ideal straight line such that the errortends to become larger. Meanwhile, since control for the robot R isperformed at every reference time (e.g., 1 ms), when the segmentdistance is set to be small, a rounding error occurs in each of thesegments, and the rounding error is accumulated by the number ofsegments so that an operating time is increased.

Therefore, in an exemplary example of dividing each of the distanceacc_dst of the acceleration section, the distance dacc_dst of thedeceleration section, and the distance cst_dst of the constant velocitysection into a plurality of segments, a maximum value of the distance ofone segment is set to be 20 mm or less and a distance of each of theplurality of segment is divided so as to not be remarkably short ascompared to 20 mm.

First, in the acceleration section, a setting in which a distance of asegment is made to become longer gradually from point A to the point p1s so as to make a moving time in each of the segments as constant aspossible.

That is, when the distance acc_dst of the acceleration section is 90 mmor less, the number of segments acc_seg_num of the acceleration sectionis set to 9, and when the distance acc_dst of the acceleration sectionis more than 90 mm, the number of segments acc_seg_num is calculated byExpression 6.

$\begin{matrix}{{{acc\_ seg}{\_ num}} = \frac{acc\_ dst}{10}} & (6)\end{matrix}$

When a segment number of each of the segments is j (j=0, 1, 2, . . . )from point A toward the point p1 s in the acceleration section, adistance acc_seg[j] of each of the segments is set by Equation 7.

$\begin{matrix}{{{acc\_ seg}\lbrack j\rbrack} = \frac{2 \times {acc\_ dst} \times \left( {j + 1} \right)}{{acc\_ seg}{\_ num} \times \left( {{{acc\_ seg}{\_ num}} + 1} \right)}} & (7)\end{matrix}$

Then, in the deceleration section, a setting is made in which a distanceof a segment is made to become shorter gradually from the point p2 s topoint B so as to make a moving time in each of the segments as constantas possible.

That is, when a distance dacc_dst of the deceleration section is 90 mmor less, the number of segments dacc_seg_num of the deceleration sectionis set to 9, and when the distance dacc_dst of the deceleration sectionis more than 90 mm, the number of segments dacc_seg_num is calculated byExpression 8.

$\begin{matrix}{{{dacc\_ seg}{\_ num}} = \frac{dacc\_ dst}{10}} & (8)\end{matrix}$

When a segment number of each of the segments is j (j=0, 1, 2, . . . )from the point p2 s to point B in the deceleration section, a distancedacc_seg[j] of each of the segments is set by Equation 9.

$\begin{matrix}{{{dacc\_ seg}\lbrack j\rbrack} = \frac{2 \times {dacc\_ dst} \times \left( {{{dacc\_ seg}{\_ num}} - j} \right)}{{dacc\_ seg}{\_ num} \times \left( {{{dacc\_ seg}{\_ num}} + 1} \right)}} & (9)\end{matrix}$

Lastly, in the constant velocity section, a distance of each of thesegments is set to be constant and is set to 20 mm or less.

Specifically, when a value obtained by dividing a distance cst_dst ofthe constant velocity section by 20 is less than 1.25, the number ofsegments cst_seg_num of the constant velocity section is set to 1. Whena value obtained by dividing the distance cst_dst of the constantvelocity section by 20 is greater than or equal to 1.25, the number ofsegments cst_seg_num of the constant velocity section is calculated byEquation 10. The distance of each of the segments is shown in Expression11.

$\begin{matrix}{{{cst\_ seg}{\_ num}} = {\frac{cst\_ dst}{20} + 1}} & (10) \\{{cst\_ seg} = \frac{cst\_ dst}{{cst\_ seg}{\_ num}}} & (11)\end{matrix}$

Further, the above-described setting of the distance of each of thesegments is merely an example, and the above-described setting may beappropriately modified. For example, as shown in Equation 7, thedistance of each of the segments in the acceleration section is set suchthat a distance between adjacent segments is increased twice, but thepresent disclosure is not limited thereto. A ratio of the distancesbetween adjacent segments may be appropriately adjusted. Similarly, aratio of the distances between adjacent segments in the decelerationsection may be appropriately adjusted.

When the reference point is moved in each of the segments according tothe PTP control, the angular velocity setting unit 313 includes afunction of setting an angular velocity of each of the segments on thebasis of variance in angle of a joint of which variance in angle becomesmaximum with respect to each of the segments in each of the accelerationsection, the constant velocity section, and the deceleration section.

A method of setting an angular velocity of a main joint of each ofsegments in the acceleration section, the constant velocity section, andthe deceleration section which are set by the segment setting unit 312will be described below with reference to FIG. 8. FIG. 8 is a graphshowing a variation in angular velocity with the passage of timeaccording to a robot control method of the first example embodiment, andan angular velocity of a main joint of each of the segments is shown ina bar shape.

As described above, the purpose of linear interpolation control of thepresent example embodiment is to allow the robot R to move along thestraight line AB, and when the robot R moves along the straight line ABaccording to the PTP control, a variation in velocity of the main jointis simulated with the passage of time. A bold line of a trapezoid shapein FIG. 8 is identical to that shown in FIG. 4, the bold line shows avariation in velocity of the main joint when the robot R operatesbetween point A and point B according to the PTP control, and thevariation in velocity thereof is simulated with a linear interpolationoperation of the present example embodiment. That is, in the presentexample embodiment, an angular velocity of the main joint in each of thesegments is set to coincide with a variation in angular velocity of themain joint in the PTP control.

Further, the angular velocity of the main joint in each of the segmentsis set to be constant.

In the linear interpolation control of the present example embodiment, amain joint is specified for each of the segments (i.e., a joint in whichvariance in angle in each of the segments becomes maximum). As describedabove, since the distance of each of the segments is set and known, anangle of each of the joints of the robot R at an end position of each ofthe segments is calculated by inverse kinematics, and thus a main jointof which variance in angle becomes maximum is specified.

When a segment number in the acceleration section is j (j=0, 1, 2, . . .), a time t at the end position of each of the segments is calculated byEquation 12.

Further, in Equation 12, maxdst_seg[j] denotes variance in angle of amain joint in a segment with a segment number j, jcur denotes a currentsegment number, t1 denotes an acceleration time demand value (msec), andVm denotes a maximal angular velocity demand value (radian).

$\begin{matrix}{t = \sqrt{\frac{2 \times {\sum\limits_{j = 0}^{jcur}{{{maxdst\_ seg}\lbrack j\rbrack} \times t\; 1}}}{Vm}}} & (12)\end{matrix}$

When a segment number in the constant velocity section is j (j=0, 1, 2,. . . ), a time t at the end position of each of the segments iscalculated by Equation 13.

$\begin{matrix}{t = {\frac{\sum\limits_{j = 0}^{jcur}{{maxdst\_ seg}\lbrack j\rbrack}}{Vm} + \frac{t\; 1}{2}}} & (13)\end{matrix}$

When a segment number in the deceleration section is j (j=0, 1, 2, . . .), a time t at the end position of each of the segments is calculated byEquation 14.

Further, in Equation 14, total_dst denotes variances in angle of overallmain joints (from point A to point B), t2 denotes a deceleration timedemand value (msec), and tf denotes a total moving time (msec). Thetotal_dst is equal to an area of a trapezoid indicated by the bold linein FIG. 8.

$\begin{matrix}{t = {{tf} - \sqrt{\frac{2 \times \left( {{total\_ dst} - {\sum\limits_{j = 0}^{jcur}{{maxdst\_ seg}\lbrack j\rbrack}}} \right) \times \left( {{tf} - {t\; 2}} \right)}{Vm}}}} & (14)\end{matrix}$

As described above, after calculating the time t at the end position ofeach of the segments in each of the acceleration section, the constantvelocity section, and the deceleration section, an angular velocity of amain joint in each of the segments is calculated by Equation 15. InEquation 15, when j=0, t[j-1] becomes zero.

$\begin{matrix}{{{speed}\lbrack j\rbrack} = \frac{{maxdst\_ seg}\lbrack j\rbrack}{{t\lbrack j\rbrack} - {t\left\lbrack {j - 1} \right\rbrack}}} & (15)\end{matrix}$

In FIG. 3, the pulse number setting unit 314 has a function of settingthe number of pulses per predetermined time according to the angularvelocity of each of the segments set by the angular velocity settingunit 313. The pulse generator 315 has a function of generating a controlpulse supplied to a motor driving each of the joints of the robot R. Inthis case, the number of control pulses is set to the number of pulsesset by the pulse number setting unit 314.

That is, when the angular velocity of each of the segments isdetermined, the number of control pulses for controlling the robot Raccording to the determined angular velocity is set at every referencetime (e.g., 1 ms). A method of determining the number of pulses mayemploy any method as long as it can determine the number of controlpulses obtaining the determined angular velocity. For example, thenumber of control pulses may be calculated by a predetermined functioncalculation using the determined angular velocity as a variable or maybe obtained by referring to a predetermined look-up table.

Next, a processing flow of the robot control apparatus of the presentexample embodiment will be described with reference to FIG. 9. FIG. 9 isa flowchart executed by the robot control apparatus3 of the presentexample embodiment.

As described above, the robot control apparatus 3 acquires the robotprogram from the information processor 2, and the controller 31 of therobot control apparatus 3 executes the acquired robot program to performeach of operations shown in FIG. 9. In the robot program, the startpoint A and the end point B are set as teaching points, and demandvalues of an acceleration time, a maximal angular velocity, and adeceleration time are set as operating parameters for movement from thestart point A to the end point B.

The controller 31 of the robot control apparatus 3 performs the linearinterpolation control for linearly moving the reference point of therobot R from the start point A to the end point B on the basis of theabove-described operation parameters. In this case, a variation inangular velocity of the main joint on the straight line AB is made tocoincide with a variation in angular velocity of the main joint whenmoved between point A and point B according to the PTP control so thatan angular velocity of the main joint in each of the segments isdetermined.

The controller 31 of the robot control apparatus 3 first sets anacceleration section, a constant velocity section, and a decelerationsection on the basis of the acceleration time demand value, thedeceleration time demand value, and the maximal angular velocity demandvalue which are set in the robot program (operation S10). The setting ofthe acceleration section, the constant velocity section, and thedeceleration section are determined by equaling a ratio of theacceleration section, the constant velocity section, and thedeceleration section to a ratio thereof when the main joint is movedbetween point A and point B according to the PTP control.

Subsequently, the controller 31 sets a plurality of segments for each ofthe acceleration section, the constant velocity section, and thedeceleration section which are set in operation S10 (operation S12).That is, each of the acceleration section, the constant velocitysection, and the deceleration section on the straight line AB is dividedinto the plurality of segments, and thus a distance of each of theplurality of segments is determined. As described above, the controller31 determines the distance of each of the segments such that movingtimes of the segments are substantially constant. In the accelerationsection, the distance of each of the segments is set to be longer fromthe point A to the point B according to an increase of a speed, whereasin the deceleration section, the distance of each of the segments is setto be shorter toward the point B according to a decrease of the speed.

Subsequently, the controller 31 sets an angular velocity of the mainjoint in each of the segments (operation S14). As described above, theangular velocity of the main joint in each of the segments is determinedto coincide with a variation in angular velocity of the main joint movedbetween point A and point B according to the PTP control.

With the processes in operations S10 to S14, the angular velocity of themain joint in each of the segments is set when the reference point ofthe robot R is moved from the start point A to the end point B by thelinear interpolation. Subsequently, the controller 31 of the robotcontrol apparatus 3 determines the number of control pulses (operationS16) so as to obtain the angular velocity of the main joint in each ofthe segments, which is set in operation S14, and generates thedetermined number of control pulses (operation S18) to transmit thegenerated pulses to the robot R.

As described above, in the robot system 1 of the present exampleembodiment, when the reference point of the robot R is moved by thelinear interpolation, the robot control apparatus 3 controls thevariation in angular velocity of the main joint of the robot R to beequal to the variation in angular velocity of the main joint moved alongthe straight line AB according to the PTP control. Consequently, whenthe robot R is linearly moved, the robot R may be moved at high speed.

FIG. 10 shows simulation results of the number of control pulses, whichis varied with the passage of time in a case in which a robot is movedbetween two exemplary points according to the PTP control and in a casein which the robot is moved between the two exemplary points accordingto the linear interpolation of the present example embodiment. In FIG.10, the number of control pulses at every 1 ms is shown for main jointsJ1, J2, and J3, each having a highest angular velocity, among the sixjoints of the robot R. As shown in FIG. 10, it can be seen that thenumber of control pulses for the main joint J1 in the PTP control issubstantially equal to the number of control pulses for each of the mainjoint J1 (until about 500 ms) and the main joint J2 (after about 500 ms)in the linear interpolation of the present example embodiment, and themoving times between the two points are substantially equal to eachother. That is, it was confirmed that the linear interpolation controlaccording to the present example embodiment may achieve the movementspeed equal to that in a case in which the robot R is moved in theoverall section according to the PTP control.

Next, a second example embodiment will be described.

In the first example embodiment, the acceleration section and thedeceleration section are set on the basis of a variance in angle of themain joint entirely moved from the start point A to the end point Baccording to the PTP control. However, in the acceleration period andthe deceleration period, the main joint is specified in a segment unit,and there may be a case in which the specified main joint does notcoincide with the main joint moved in the overall section according tothe PTP control. In such a case, an amount of movement of the main jointobtained by summing an amount of movement of the main joint in a segmentunit for all the segments becomes larger than an amount of movement ofthe main joint moved in the overall section according to the PTP controlso that a total moving time according to the present example embodimentmay become longer. That is, a term of Σ in each of Equations 12 and 14increases, and the time t at the end position of each of the segments isretarded so that the total moving time may become longer.

Therefore, the present example embodiment is characterized in thatsegments of the acceleration section and/or the deceleration section arereset on the basis of the variance in angle of the main joint in each ofthe segments so as to satisfy the acceleration time demand value and thedeceleration time demand value.

When a first difference value, which is obtained by subtracting theacceleration time demand value from the acceleration time according tothe angular velocity of each of the segments set by the angular velocitysetting unit 313, is greater than a first threshold value, the segmentsetting unit 312 of the present example embodiment resets the number ofsegments in the acceleration section or a distance of each of thesegments so as to obtain a first difference value that is equal to orless than the first threshold value.

Further, when a second difference value, which is obtained bysubtracting the deceleration time demand value from the decelerationtime according to the angular velocity of each of the segments set bythe angular velocity setting unit 313, is greater than a secondthreshold value, the segment setting unit 312 of the present exampleembodiment resets the number of segments in the deceleration section ora distance of each of the segments so as to obtain a second differencevalue that is equal to or less than the second threshold value.

Furthermore, each of the first threshold value and the second thresholdvalue may be appropriately set according to an allowable level in asystem for discrepancy with respect to the acceleration time demandvalue and the deceleration time demand value.

An example of resetting the number of segments or a distance of each ofthe segments, which is performed by the segment setting unit 312 of thepresent example embodiment, will be described below with reference toFIG. 11. FIG. 11 is a graph showing a variation in angular velocity of amain joint with the passage of time before and after a segmentadjustment in a robot control method according to the present exampleembodiment.

In FIG. 11, before the segment adjustment, since a main joint specifiedwith respect to each of the segments in the acceleration section doesnot coincide with the main joint moved according to the PTP control, theacceleration time according to the linear interpolation control becomeslonger than an acceleration time demand value t1. Therefore, a totalmoving time tf becomes longer.

On the other hand, in the present example embodiment, the segmentsetting unit 312 shortens the distance of each of the segments in theacceleration section or reduces the number of segments such that theacceleration section meets the following conditional expression 16. Forexample, the distance of each of the segments may be adjusted by varyingintegers of Equations 6 and 7.

Further, in the conditional expression 16, maxdst_seg[j] denotesvariance in angle of a main joint in a segment with a segment number j,jcur denotes a current segment number, t1 denotes an acceleration timedemand value (msec), and Vm denotes a maximal angular velocity demandvalue (radian).

$\begin{matrix}{\frac{2 \times {\sum\limits_{j = 0}^{jcur}{{maxdst\_ seg}\lbrack j\rbrack}}}{Vm} \leq {t\; 1}} & (16)\end{matrix}$

In the distance of each of the segments in the acceleration sectionbefore the segment adjustment, since the angular velocity set to each ofthe segments is faster than that indicated by the bold line according tothe PTP control in FIG. 11, the conditional expression 16 is notsatisfied.

Thus, since the distance of each of the segments in the accelerationsection is shortened or the number of segments of the acceleration timeis decreased, it is possible to satisfy the conditional expression 16.As a result, as shown in FIG. 11, in the acceleration section after thesegment adjustment, it can be seen that the acceleration becomes sloweras compared to before the segment adjustment, thereby satisfying theacceleration time demand value.

For example, a value obtained by subtracting the left side from theright side of the conditional expression 16 is the first differencevalue.

Similarly, before the segment adjustment, since a main joint specifiedwith respect to each of the segments in the deceleration section doesnot substantially coincide with the main joint moved according to thePTP control, as in the acceleration section, there may be a case inwhich the total moving time according to the present example embodimentbecomes longer.

Thus, the segment setting unit 312 shortens the distance of each of thesegments in the deceleration section or reduces the number of segments,thereby satisfying the following conditional expression 17. For example,the distance of each of the segments may be adjusted by varying integersof Equations 8 and 9.

Further, in the conditional expression 17, maxdst_seg[j] denotesvariance in angle of a main joint in a segment with a segment number j,jcur denotes a current segment number, t2 denotes a deceleration timedemand value (msec), tf denotes a total travel time (msec), and Vmdenotes a maximal angular velocity demand value (radian).

For example, a value obtained by subtracting the left side from theright side of the conditional expression 17 is the second differencevalue.

$\begin{matrix}{\frac{2 \times {\sum\limits_{j = {jmax}}^{jcur}{{maxdst\_ seg}\lbrack j\rbrack}}}{Vm} \leq \left( {{tf} - {t\; 2}} \right)} & (17)\end{matrix}$

The processing flow of the robot control apparatus 3 of the presentexample embodiment is shown in FIG. 12. FIG. 12 is a flowchart executedby the robot control apparatus 3 of the present example embodiment.

A difference between the flowchart shown in FIG. 12 and that shown inFIG. 9 is that operation S15 is added.

When the angular velocity of the main joint in each of the segments isset (operation S14), the controller 31 of the robot control apparatus 3determines whether the acceleration time demand value and thedeceleration time demand value are satisfied (i.e., the conditionalexpressions 16 and 17) (operation S15). When it is determined that theacceleration time demand value and the deceleration time demand valueare not satisfied, the procedure returns to operation S12 to vary thenumber of segments in the acceleration section and/or the decelerationsection or vary the distance of each of the segments. Operations S12 andS14 are repeatedly performed until the conditional expressions 16 and 17of operation S15 are satisfied.

In this case, in operation S15, a sum condition may be a case in which avalue obtained by subtracting the left side from the right side of theconditional expression 16 is less than or equal to a predetermined firstthreshold value and a value obtained by subtracting the left side fromthe right side of the conditional expression 17 is less than or equal toa predetermined second threshold value.

Next, a third example embodiment will be described.

Since the angular velocity of the main joint set by the robot controlapparatus 3 of the first example embodiment is constant within each ofthe segments, there may be a case in which the angular velocity of themain joint may be significantly varied between the segments. However, alarge variation in angular velocity is undesirable because vibration mayoccur at the robot R. Thus, in the present example embodiment, avariation in angular velocity of the main joint is smooth so as toprevent generation of vibration at the robot R.

From the above-described aspect, the robot control apparatus 3 of thepresent example embodiment further includes a filter processor forperforming a filter process on a pulse number set by the pulse numbersetting unit 314. Further, the pulse generator 315 sets the number ofthe control pulse as the number of pulses after the filter process.

A method of the filter process is not particularly limited. For example,the method may employ a moving average filter based on the number ofpulses which is set for a predetermined number of reference times (e.g.,1 ms). The number of samples for the number of pulses used in the movingaverage filter is not limited. However, in order to enhance an effect ofsmoothing, it is preferable that the number of samples is sufficientlylarge, whereas when the number of samples is excessively large, themoving time becomes longer. In an exemplary example, the number n ofsamples is ten.

Specifically, when the number of k^(th) control pulses for a joint of ajoint number i (i=1 to 6) is pls_new[i][k], the number of pulsespls_new[i][k] is obtained by Equation 18.

Further, in Equation 18, pls_new denotes the number of control pulsesafter application of the moving average filter, pls denotes the numberof control pulses before application of the moving average filter, idenotes a joint number (1, 2, 3, 4, 5, or 6), k denotes the number ofgeneration of an operation pulse, and n denotes the number of samplesused for a moving average.

$\begin{matrix}{{{{pls\_ new}\lbrack i\rbrack}\lbrack k\rbrack} = \frac{\left( {{{{pls}\lbrack i\rbrack}\left\lbrack {k - \left( {n - 1} \right)} \right\rbrack} + {{{pls}\lbrack i\rbrack}\left\lbrack {k - \left( {n - 2} \right)} \right\rbrack} + \ldots + {{{pls}\lbrack i\rbrack}\lbrack k\rbrack}} \right)}{n}} & (18)\end{matrix}$

As described above, a plurality of exemplary embodiments of the robotcontrol apparatus of the present disclosure have been described indetail, but the present disclosure is not limited to the above-describedexemplary embodiments. Further, the above-described exemplaryembodiments can be improved or modified in various ways withoutdeparting from the gist of the present disclosure. For example, thetechnical details described for the respective exemplary embodiments maybe appropriately combined between different example embodiments as longas technical contradictions do not occur.

A program for realizing at least some functions of the functionsdescribed in the functional block diagram of FIG. 3 and a computerreadable storage medium (including a nonvolatile storage medium) inwhich the program is stored can be understood by those skilled in theart.

Features of the above-described example embodiments and themodifications thereof may be combined appropriately as long as noconflict arises.

While example embodiments of the present disclosure have been describedabove, it is to be understood that variations and modifications will beapparent to those skilled in the art without departing from the scopeand spirit of the present disclosure. The scope of the presentdisclosure, therefore, is to be determined solely by the followingclaims.

What is claimed is:
 1. A robot control apparatus for moving a referencepoint of an articulated robot including a plurality of joints from astart point to an end point by a linear interpolation, the robot controlapparatus comprising: section setting circuitry to set, on a straightline connecting the start point to the end point, an accelerationsection in which the reference point is accelerated from the start pointto reach a predetermined angular velocity, a constant velocity sectionin which the reference point is maintained at the predetermined angularvelocity, and a deceleration section in which the reference point isdecelerated from the predetermined angular velocity to reach the endpoint; segment setting circuitry to divide each of the accelerationsection, the constant velocity section, and the deceleration sectioninto a plurality of segments and to set segment distances of each of theacceleration section, the constant velocity section, and thedeceleration section so as to equalize or substantially equalize movingtimes of reference points corresponding to each of the accelerationsection, the constant velocity section, and the deceleration section;and angular velocity setting circuitry to set, when the reference pointis moved in each of the segments according to point to point control, anangular velocity of each of the segments based on a variance in angle ofa main joint which has a greatest variance in angle among each of thesegments in each of the acceleration section, the constant velocitysection, and the deceleration section; wherein the point to pointcontrol controls a change in an angular velocity of the main joint to beequal to a change in angular velocity of the main joint along thestraight line connecting the start point and the end point.
 2. The robotcontrol apparatus of claim 1, wherein the section setting circuitry setsthe acceleration section, the constant velocity section, and thedeceleration section based on an acceleration time demand value forwhich the reference point is accelerated from the start point to reach apredetermined angular velocity, and a deceleration time demand value forwhich the reference point is decelerated from the predetermined angularvelocity to reach the end point.
 3. The robot control apparatus of claim1, further comprising: a pulse number setting circuitry to set a numberof pulses per predetermined time according to the angular velocity ofeach of the segments set by the angular velocity setting circuitry; afilter processing circuitry to perform a filter process on the number ofpulses set by the pulse number setting circuitry; and pulse generatingcircuitry to generate a control pulse supplied to a motor to drive eachof the joints of the robot and to set a number of control pulses as thenumber of pulses after the filter process.
 4. The robot controlapparatus of claim 3, wherein the filter process performs a movingaverage filter process based on the number of pulses set for apredetermined number of the predetermined times.
 5. A robot controlmethod for moving a reference point of an articulated robot including aplurality of joints from a start point to an end point by a linearinterpolation, the robot control method comprising: setting, on astraight line connecting the start point to the end point, anacceleration section in which the reference point is accelerated fromthe start point to reach a predetermined angular velocity, a constantvelocity section in which the reference point is maintained at thepredetermined angular velocity, and a deceleration section in which thereference point is decelerated from the predetermined angular velocityto reach the end point; dividing each of the acceleration section, theconstant velocity section, and the deceleration section into a pluralityof segments and setting segment distances of each of the accelerationsection, the constant velocity section, and the deceleration section soas to equalize or substantially equalize moving times of referencepoints corresponding to each of the acceleration section, the constantvelocity section, and the deceleration section; and when the referencepoint is moved in each of the segments according to point to pointcontrol, setting an angular velocity of each of the segments based on avariance in angle of a main joint which has a greatest variance in angleamong each of the segments in each of the acceleration section, theconstant velocity section, and the deceleration section; wherein thepoint to point control controls a change in an angular velocity of themain joint to be equal to a change in angular velocity of the main jointalong the straight line connecting the start point and the end point. 6.A non-transitory computer-readable medium including a program that isexecutable by a computer to perform a method of moving a reference pointof an articulated robot including a plurality of joints from a startpoint to an end point by a linear interpolation, the method comprising:setting, on a straight line connecting the start point to the end point,an acceleration section in which the reference point is accelerated fromthe start point to reach a predetermined angular velocity, a constantvelocity section in which the reference point is maintained at thepredetermined angular velocity, and a deceleration section in which thereference point is decelerated from the predetermined angular velocityto reach the end point; dividing each of the acceleration section, theconstant velocity section, and the deceleration section into a pluralityof segments and setting segment distances of each of the accelerationsection, the constant velocity section, and the deceleration section soas to equalize or substantially equalize moving times of referencepoints corresponding to each of the acceleration section, the constantvelocity section, and the deceleration section; and when the referencepoint is moved in each of the segments according to point to pointcontrol, setting an angular velocity of each of the segments based on avariance in angle of a main joint which has a greatest variance in angleamong each of the segments in each of the acceleration section, theconstant velocity section, and the deceleration section; wherein thepoint to point control controls a change in an angular velocity of themain joint to be equal to a change in angular velocity of the main jointalong the straight line connecting the start point and the end point.